#include <iostream>
#include <stack>
#include <sstream>
using namespace std;

int main() {
    string a;
    getline(cin, a, '@');
    stack<double> numope;  // Change stack type to double

    for (int i = 0; i < a.size(); i++) {
        if (a[i] >= '0' && a[i] <= '9') {
            int temp = 0;
            while (a[i] >= '0' && a[i] <= '9') {
                temp = temp * 10 + a[i] - '0';
                i++;
            }
            numope.push(temp);
            i--;
        } else if (a[i] == '+') {
            double x = numope.top();  // Change variable type to double
            numope.pop();
            double y = numope.top();
            numope.pop();
            numope.push(x + y);
        } else if (a[i] == '-') {
            double x = numope.top();
            numope.pop();
            double y = numope.top();
            numope.pop();
            numope.push(y - x);
        } else if (a[i] == '*') {
            double x = numope.top();
            numope.pop();
            double y = numope.top();
            numope.pop();
            numope.push(x * y);
        } else if (a[i] == '/') {
            double x = numope.top();
            numope.pop();
            double y = numope.top();
            numope.pop();
            numope.push(y / x);
        } else if (a[i] == '@') {
            break;
        }
    }

    cout << numope.top() << endl;
    return 0;
}

